﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PHeader.ascx.cs" Inherits="BaoJian.P.Control.PHeader" %>
<link type="text/css" href="../Style/search_gateway.css" rel="stylesheet" />
<script type="text/javascript" src="../Js/jquery/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="../Js/jquery/plugins/jquery.autocomplete.js"></script>
<script type="text/javascript">
    function findValue(li)
     {
	    if( li == null )  return "";
	    if(li == "")  return "";	   
	    // if coming from an AJAX call, let's use the CityId as the value
	    if( !!li.extra ) var sValue = li.extra[0];
	    // otherwise, let's just display the value in the text box
	    else var sValue = li.selectValue; 
	    return sValue;  
	  }
    function selectItem(li) {
        findValue(li);
    }
    function formatItem(row) {
	    return row[0] ;
    }
    function lookupAjax(){      
       var sValue = $("#keywords").val();  
	   if(sValue == null || sValue == "")
	   {
	       return false;
	    }
	   window.location.href = "search.aspx?skey="+sValue;
       return false;
    }   

    
    function GoSearch(e)
    {
       var keynum;  
       var keychar;  
       var numcheck;  
       var keynum = window.event ? e.keyCode:e.which;      
       if (keynum == 13)
       { 
          e.returnValue= false;
          e.cancel = true;
          var sValue = $("#keywords").val();
          if(sValue == null || sValue == "")
	         return false;
          window.open("search.aspx?skey="+sValue,"","");  
        }
        else
            return false;  
    }
    //"/ajax/SearchProductKeyWord.ashx",	
	$(document).ready(function() {	 
	$("#keywords").autocomplete(		
		"../ajax/SearchProductKeyWord.ashx",
		{			
			delay:10,
			minChars:1,
			matchSubset:1,
			matchContains:1,
			cacheLength:10,
			onItemSelect:selectItem,
			onFindValue:findValue,
			formatItem:formatItem,
			autoFill:true,
			selectFirst:true	
		}
	);
});

</script>

<div class="top">
    <div class="nav-logo">
        <div id="logo">
        </div>
        <div class="nav">
            <ul>
                <li><a href="/default.aspx">昭光首页</a></li>
                <li><a href="/p/PDoc.aspx?oid=3bf51781-03c7-492f-9224-56880e43b66e">互换规则</a></li>
                <li><a href="http://app1.sfda.gov.cn/datasearch/face3/dir.html"   target="_blank">查询真伪</a></li>
                <li><a href="/e/mn/register.aspx">会员注册</a></li>
                <li><a href="/p/PDoc.aspx?oid=cbdbd6bd-40d5-4813-884a-91395f590a5d">互换心得</a></li>
                <li><a href="/p/clist.aspx?c=b2117729-2034-4720-b0ba-d4ea3445187f">紧急互换</a></li>
            </ul>
        </div>
    </div>
    <div id="fla">
        <img src="images/hhpt.gif" width="680" height="172" />
    </div>
    <div class="login-search">
        <div class="login">
            <fieldset class="loginFld">
                <legend><span>登录</span></legend>
                <div class="usernameFld">
                    <div class="usernameFldlabel">
                        <label class="usernameFldTxt">
                            用户名</label></div>
                    <div class="usernameFldinput">
                        <input type="text" name="username" id="username" value="" autocomplete="off" /></div>
                </div>
                <div class="passwordFld">
                    <div class="passwordFldlabel">
                        <label class="passwordFldTxt">
                            密码</label></div>
                    <div class="passwordFldinput">
                        <input type="password" name="password" id="password" onfocus="openLoginType()" /><input
                            type="hidden" name="entry" value="null" /><input type="hidden" id="act" name="act"
                                value="1" /></div>
                </div>
                <div class="bottonFld">
                    <input type="submit" align="absmiddle" id="bottonFldsubmit" value="登录" /></div>
                <div class="enrol">
                    <a href="/e/mn/register.aspx">注册</a></div>
            </fieldset>
        </div>
        <div class="searchBox">
            <input type="text" id="keywords" onkeydown="GoSearch(event)" name="keywords" value="" />
            <input type="button" id="searchBtn" onclick="lookupAjax();" name="searchBtn" style="width: 40px;
            height: 24px" value="搜索" />          
        </div>
    </div>
</div>
